﻿@model XSTDZ.ERP.WebApp.Models.ProductDeliveryBillPrint
@{
    ViewBag.Title = " - 收货确认打印";
}
@section header{
<script type="text/javascript" language="javascript" src="../Content/componets/Lodop6.158/LodopFuncs.js"></script>
<object  id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width="0" height="0"> 
       <embed id="LODOP_EM" type="application/x-print-lodop" width="0" height="0"></embed>
</object>
<style type="text/css">
     table.formtable{width:100%; border:1px solid #B1CDE3;padding:0;margin:0 auto; border-collapse: collapse; }  
     table.formtable td {border: 1px solid #B1CDE3;background: #fff;  font-size:12px;   padding: 3px 3px 3px 8px;   color: #4f6b72;}  
     table.formtable td.title{width:100px; text-align:right; padding:0 10px 0 0;}
</style>
}

<div id="printContent">
    <table class="formtable" style="width:100%; padding:0;margin:0 auto; border-collapse: collapse;">
        <thead>
            <tr><td colspan="4" style=" text-align:center; font-size:20px; padding:0 0 20px 0; font-weight:bold;">新盛泰收货确认</td></tr>
        </thead>
        <tbody>
           @* <tr>
                <td colspan="3"></td>
                <td>@Model.ProductDeliveryBillDto.DeliveryNo</td>
            </tr>*@
            <tr style=" height:24px;">
             <td class="title" style="width:100px; padding:0 10px 0 0;">单   号：</td>
               <td>@Model.ProductDeliveryBillDto.DeliveryNo</td>
               <td class="title"  style="width:100px;  padding:0 10px 0 0;">发货仓库：</td>
               <td>@Model.ProductDeliveryBillDto.StorehouseName</td>
            </tr>
            <tr style=" height:24px;">
               <td class="title" style="width:100px;  padding:0 10px 0 0;">发货人：</td>
               <td>@Model.ProductDeliveryBillDto.DeliveryorName</td>
               <td class="title" style="width:100px; padding:0 10px 0 0;">送货人：</td>
               <td>@Model.ProductDeliveryBillDto.DeliveryorName</td>
            </tr>
            <tr style=" height:24px;">
               <td class="title" style="width:100px;  padding:0 10px 0 0;">发货时间：</td>
               <td>@Model.ProductDeliveryBillDto.DeliveryDate</td>
               <td class="title" style="width:100px; padding:0 10px 0 0;">总品种数：</td>
               <td>@Model.ProductDeliveryBillDetailDtos.Count()</td>
            </tr>
          
            <tr>
                <td colspan="4">
                    <table style="width:100%; border:1px solid #000;padding:0;margin:0 auto; border-collapse: collapse; margin:10px 0;">
                        <tr>
                            <td style=" text-align:center; font-weight:bold; font-size:16px;border:1px solid #000;">产品名称</td>
                            <td style="text-align:center; font-weight:bold; font-size:16px;border:1px solid #000;">数量(个)</td>
                             <td style="text-align:center; font-weight:bold; font-size:16px;border:1px solid #000;">包装规格</td>
                             <td style="text-align:center; font-weight:bold; font-size:16px;border:1px solid #000;">客户编号</td>
                             <td style="text-align:center; font-weight:bold; font-size:16px;border:1px solid #000;">备注</td>
                        </tr>
                        @foreach (var item in @Model.ProductDeliveryBillDetailDtos)
                        {
                        <tr>
                            <td style="text-align:center; font-size:16px;border:1px solid #000;">@item.ProductName</td>
                              <td style=" text-align:center; font-size:16px;border:1px solid #000;">@item.SenderCount </td>
                             <td style="text-align:center;  font-size:16px;border:1px solid #000;">@item.Pack</td>
                             <td style="text-align:center;  font-size:16px;border:1px solid #000;">@item.ClientNo</td>
                             <td style="text-align:center; font-size:16px;border:1px solid #000;">@item.Remarks</td>
                        </tr>
                        }
                    </table>
                </td>
            </tr>

            <tr style=" height:24px;">
               <td class="title" style="width:100px;  padding:0 10px 0 0;">收货签字：</td>
                <td colspan="3" style=" border-bottom:1px solid #000;"></td>
            </tr>

           @* <tr style=" height:24px;">
               <td class="title" style="width:100px;  padding:0 10px 0 0;">审 核 人：</td>
               <td>@Model.ProductDeliveryBillDto.AuditorName</td>
               <td class="title" style="width:100px;  padding:0 10px 0 0;">审核时间：</td>
               <td>@Model.ProductDeliveryBillDto.AuditTime</td>
            </tr>*@
           @* <tr style=" height:24px;">
               <td class="title" style="width:100px;  padding:0 10px 0 0;">公司地址：</td>
                <td>无此字段</td>
               <td class="title" style="width:100px;  padding:0 10px 0 0;">联系电话：</td>
               <td>无此字段</td>
            </tr>*@
        </tbody>
    </table>
</div>



<script language="javascript" type="text/javascript">

    $(document).ready(function () { prn1_preview(); });

    var LODOP; //声明为全局变量 
    function prn1_preview() {
        CreateOneFormPage();
        LODOP.PREVIEW();
    };
    //    function prn1_print() {
    //        CreateOneFormPage();
    //        LODOP.PRINT();
    //    };
    //    function prn1_printA() {
    //        CreateOneFormPage();
    //        LODOP.PRINTA();
    //    };
    function CreateOneFormPage() {
        LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
        LODOP.PRINT_INIT("鑫胜泰电子销售打印");
        LODOP.SET_PRINT_STYLE("FontSize", 18);
        LODOP.SET_PRINT_STYLE("Bold", 1);
//        LODOP.ADD_PRINT_TEXT(50, 231, 260, 39, "打印页面部分内容");
        LODOP.ADD_PRINT_HTM(20, 50, 600, 800, document.getElementById("printContent").innerHTML);
        // LODOP.ADD_PRINT_HTM(88, 200, 350, 600, document.getElementById("ProductOutBillGrid").innerHTML);
    };
    //    function prn2_preview() {
    //        CreateTwoFormPage();
    //        LODOP.PREVIEW();
    //    };
    //    function prn2_manage() {
    //        CreateTwoFormPage();
    //        LODOP.PRINT_SETUP();
    //    };
    //    function CreateTwoFormPage() {
    //        LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
    //        LODOP.PRINT_INIT("打印控件功能演示_Lodop功能_表单二");
    //        LODOP.ADD_PRINT_RECT(70, 27, 634, 242, 0, 1);
    //        LODOP.ADD_PRINT_TEXT(29, 236, 279, 38, "页面内容改变布局打印");
    //        LODOP.SET_PRINT_STYLEA(2, "FontSize", 18);
    //        LODOP.SET_PRINT_STYLEA(2, "Bold", 1);
    //        LODOP.ADD_PRINT_HTM(88, 40, 321, 185, document.getElementById("form1").innerHTML);
    //        LODOP.ADD_PRINT_HTM(87, 355, 285, 187, document.getElementById("form2").innerHTML);
    //        LODOP.ADD_PRINT_TEXT(319, 58, 500, 30, "注：其中《表单一》按显示大小，《表单二》在程序控制宽度(285px)内自适应调整");
    //    };
    //    function prn3_preview() {
    //        LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
    //        LODOP.PRINT_INIT("打印控件功能演示_Lodop功能_全页");
    //        LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", document.documentElement.innerHTML);
    //        LODOP.PREVIEW();
    //    };	
</script> 